package org.codersz.product.client;

import org.codersz.product.common.DecreaseStockInput;
import org.codersz.product.common.ProductInfoOutput;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient("product")
public interface ProductClient {

    @GetMapping("/product/listForOrder")
    List<ProductInfoOutput> listForOrder(List<String> productIdList);

    @PostMapping("/product/decreaseStock")
    void decreaseStock(List<DecreaseStockInput> decreaseStockInputList);

}
